Skip to content

[lldb-dap] Fix type req->arguments == "disconnect" #149446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025

Conversation

kusmour
Copy link
Contributor

@kusmour kusmour commented Jul 18, 2025

This typo was introduced in PR #140331. This branch will never get executed. We also set the disconnecting = true in the DAP::Disconnect() so I am not sure if we need it in both places.

This typo was introduced in PR llvm#140331. This branch will never get executed. We also set the `disconnecting = true` in the `DAP::Disconnect()` so I am not sure if we need it in both places.
@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2025

@llvm/pr-subscribers-lldb

Author: Wanyi (kusmour)

Changes

This typo was introduced in PR #140331. This branch will never get executed. We also set the disconnecting = true in the DAP::Disconnect() so I am not sure if we need it in both places.


Full diff: https://github.com/llvm/llvm-project/pull/149446.diff

1 Files Affected:

  • (modified) lldb/tools/lldb-dap/DAP.cpp (+1-1)
diff --git a/lldb/tools/lldb-dap/DAP.cpp b/lldb/tools/lldb-dap/DAP.cpp
index fd89f52595ec6..cbd3b14463e25 100644
--- a/lldb/tools/lldb-dap/DAP.cpp
+++ b/lldb/tools/lldb-dap/DAP.cpp
@@ -983,7 +983,7 @@ llvm::Error DAP::Loop() {
 
           if (const protocol::Request *req =
                   std::get_if<protocol::Request>(&*next);
-              req && req->arguments == "disconnect")
+              req && req->command == "disconnect")
             disconnecting = true;
 
           const std::optional<CancelArguments> cancel_args =

@kusmour kusmour merged commit de453e8 into llvm:main Jul 18, 2025
12 checks passed
@kusmour kusmour deleted the lldb-dap-fix-typo branch July 18, 2025 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants